import request from '@/utils/request'


// 获取列表
export function list(query) {
	return request({
		url: '/system/adoption/list',
		method: 'get',
		params: query
	})
}
// 获取列表
export function releaselist(query) {
	return request({
		url: '/service/release/list',
		method: 'get',
		params: query
	})
}
// 获取活动列表
export function activitieslist(query) {
	return request({
		url: '/service/activities/list',
		method: 'get',
		params: query
	})
}

// 举报审核列表
export function reportlist(query) {
	return request({
		url: '/service/report/list',
		method: 'get',
		params: query
	})
}
// 举报审核列表
export function tnrList(query) {
	return request({
		url: '/service/application/list',
		method: 'get',
		params: query
	})
}
// 我的
export function checkedBy(query) {
	return request({
		url: '/system/adoption/togJI',
		method: 'get',
		params: query
	})
}
// 举报审核列表
export function bannerList(query) {
	return request({
		url: '/service/chart/list',
		method: 'get',
		params: query
	})
}
// 领养列表
export function adoptList(query) {
	return request({
		url: '/service/adopt/list',
		method: 'get',
		params: query
	})
}

//添加举报
export function addreport(data) {
	return request({
		url: '/service/report/',
		method: 'post',
		data: data
	})
}
//添加领养
export function addadoption(data) {
	return request({
		url: '/service/adopt',
		method: 'post',
		data: data
	})
}
// 新增宠物信息管理
export function addRelease(data) {
  return request({
    url: '/service/release',
    method: 'post',
    data: data
  })
}

// 新增领养审核
export function addAdoption(data) {
  return request({
    url: '/system/adoption',
    method: 'post',
    data: data
  })
}
//添加咨询
export function consultation(data) {
	return request({
		url: '/service/consultation/',
		method: 'post',
		data: data
	})
}
//添加宠物活动
export function activities(data) {
	return request({
		url: '/service/activities/',
		method: 'post',
		data: data
	})
}
//新增殡葬申请
export function addfuneral(data) {
	return request({
		url: '/service/funeral',
		method: 'post',
		data: data
	})
}
//新增殡葬申请
export function appAdd(data) {
	return request({
		headers: {
			isToken: false
		},
		url: '/system/user/appAdd',
		method: 'post',
		data: data
	})
}
//添加举报
export function addTnr(data) {
	return request({
		url: '/service/application/',
		method: 'post',
		data: data
	})
}
// 获取领养详情
export function details(query) {
	return request({
		url: '/system/adoption/list',
		method: 'get',
		params: query
	})
}


// 获取酒品订单
export function winOrder(query) {
	query.orderType = 1;
	query.isDelete = 4;
	return request({
		url: '/service/neworder/app/list',
		method: 'get',
		params: query
	})
}


// 获取会员订单
export function memberOrder(query) {
	query.orderType = 2;
	query.isDelete = 4;
	return request({
		url:'/service/neworder/app/list',
		method: 'get',
		params: query
	})
}

//购物车结算
export function place(uuids) {
	return request({
		url: '/service/neworder/place/'+uuids,
		method: 'get',
	})
}


//购物车结算
export function deleteOrder(data) {
	return request({
		url: '/service/neworder/delete/order',
		method: 'put',
		data:data
	})
}




//购物车结算
export function buyWine(data) {
	return request({
		url: '/service/neworder/buyNow',
		method: 'post',
		data: data
	})
}





//撤销订单
export function revoke(uuid) {
	return request({
		url: '/service/neworder/revoke/'+ uuid,
		method: 'get',
	})
}

//是否有未支付的订单
export function expire() {
	return request({
		url: '/service/neworder/expire',
		method: 'get',
	})
}


//支付
export function pay(uuid,type) {
	return request({
		url: '/service/neworder/pay/'+uuid+"/"+type,
		method: 'get',
	})
}

//销单申请
export function refundOrder(data) {
	return request({
		url: '/service/neworder/refund',
		method: 'post',
		data: data
	})
}


//取消订单
export function cancel(uuid) {
	return request({
		url: '/service/neworder/cancel/'+uuid,
		method: 'get',
	})
}



// 获取搬运订单
export function transportationOrder(query) {
	query.orderType = 3;
	query.isDelete = 4;
	return request({
		url: '/service/neworder/app/list',
		method: 'get',
		params: query
	})
}
